<html>
<head><meta charset="utf-8"><title>Question on Ids used in HIR · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html">Question on Ids used in HIR</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="204589185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204589185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204589185">(Jul 21 2020 at 19:07)</a>:</h4>
<p>Is there a good word for the item that is identified by the HirId? The CrateNum identifies the crate and the DefId identifies a definition within the crate, what would you call what the HirId identifies within a definition?</p>



<a name="204589365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204589365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204589365">(Jul 21 2020 at 19:08)</a>:</h4>
<p>An HIR node?</p>



<a name="204589596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204589596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204589596">(Jul 21 2020 at 19:10)</a>:</h4>
<p>That is a possibility</p>



<a name="204589618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204589618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204589618">(Jul 21 2020 at 19:10)</a>:</h4>
<p>though I think the HirId is different from the NodeId</p>



<a name="204589861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204589861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204589861">(Jul 21 2020 at 19:12)</a>:</h4>
<p>NodeId is for AST nodes</p>



<a name="204595445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204595445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204595445">(Jul 21 2020 at 19:55)</a>:</h4>
<p>ah</p>



<a name="204601729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204601729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204601729">(Jul 21 2020 at 20:55)</a>:</h4>
<p>yeah <code>HirId</code> is "HIR (node) ID"</p>



<a name="204601740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204601740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204601740">(Jul 21 2020 at 20:55)</a>:</h4>
<p>we could rename both of them to reflect that better <em>shrug</em></p>



<a name="204601746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204601746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204601746">(Jul 21 2020 at 20:55)</a>:</h4>
<p>lots of room for improvement</p>



<a name="204604452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204604452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204604452">(Jul 21 2020 at 21:22)</a>:</h4>
<p>cool - I appreciate the help!</p>



<a name="204606665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204606665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204606665">(Jul 21 2020 at 21:47)</a>:</h4>
<p>Would anyone be willing to take a look at my slides for the talk where I explain this? (I will be presenting it at Rusty Days next week). Right now I'm just looking for technical accuracy, rather than opinions on the styling of the slides (which I will do after I get the content locked in)</p>



<a name="204607508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204607508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204607508">(Jul 21 2020 at 21:57)</a>:</h4>
<p>sure, sounds fun! btw if I had some slides I'd probably go ask <span class="user-mention" data-user-id="116009">@nikomatsakis</span> but he's also really busy all the time <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="204607600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204607600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204607600">(Jul 21 2020 at 21:58)</a>:</h4>
<p>idk if there's a place where you'd be guaranteed relevant people will see it</p>



<a name="204607633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204607633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204607633">(Jul 21 2020 at 21:58)</a>:</h4>
<p>(in general, I mean. I only see some stuff because I'm randomly clicking in the Zulip UI)</p>



<a name="204607989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204607989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204607989">(Jul 21 2020 at 22:02)</a>:</h4>
<p>lol - I already have a run through scheduled with him later this week :)</p>



<a name="204607997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204607997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204607997">(Jul 21 2020 at 22:02)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> what is a good email for you?</p>



<a name="204608033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204608033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204608033">(Jul 21 2020 at 22:02)</a>:</h4>
<p>what for? PM works :P</p>



<a name="204608049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204608049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204608049">(Jul 21 2020 at 22:03)</a>:</h4>
<p>I'm not willing to make the google drive link public just yet</p>



<a name="204608050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204608050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204608050">(Jul 21 2020 at 22:03)</a>:</h4>
<p>other than that, if you must, it should be listed on <a href="https://github.com/eddyb">https://github.com/eddyb</a></p>



<a name="204608098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204608098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204608098">(Jul 21 2020 at 22:03)</a>:</h4>
<p>(you can get the more personal email from <code>git</code> but it gets enough spam as it is so I try to not "say it out loud" where possible :P)</p>



<a name="204608101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204608101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204608101">(Jul 21 2020 at 22:03)</a>:</h4>
<p>sharing the deck with you (if that doesn't work, let me know, I'll export it into a PDF and send you that)</p>



<a name="204608200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204608200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204608200">(Jul 21 2020 at 22:04)</a>:</h4>
<p>it will work if I remember to use <code>/u/1</code> instead of <code>/u/0</code> (or switch in the UI) :P</p>



<a name="204608253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204608253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204608253">(Jul 21 2020 at 22:05)</a>:</h4>
<p>Sent to your email :)</p>



<a name="204608520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204608520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204608520">(Jul 21 2020 at 22:07)</a>:</h4>
<p>looking now :D</p>



<a name="204608705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204608705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204608705">(Jul 21 2020 at 22:09)</a>:</h4>
<p>thanks for reminding me that I haven't read TWiR in ages :(</p>



<a name="204608763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204608763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204608763">(Jul 21 2020 at 22:10)</a>:</h4>
<p>I should start again but it can be overwhelming, so much stuff happening</p>



<a name="204609988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204609988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204609988">(Jul 21 2020 at 22:25)</a>:</h4>
<p>I also publish at 10 min or so podcast summing it up every week :)</p>



<a name="204610013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204610013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204610013">(Jul 21 2020 at 22:25)</a>:</h4>
<p>On the Rustacean Station <a href="https://rustacean-station.org/episode/023-twir-348/">https://rustacean-station.org/episode/023-twir-348/</a></p>



<a name="204610141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204610141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nell Shamrell-Harrington <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204610141">(Jul 21 2020 at 22:27)</a>:</h4>
<p>I would also welcome any suggestions on where it might be good to expand it - it's currently running about 20 min (just under, actually) and I have a 45 min slot</p>



<a name="204619353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204619353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204619353">(Jul 22 2020 at 00:39)</a>:</h4>
<p>oh, the talk you sent me the slides for?</p>



<a name="204619423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Question%20on%20Ids%20used%20in%20HIR/near/204619423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Question.20on.20Ids.20used.20in.20HIR.html#204619423">(Jul 22 2020 at 00:40)</a>:</h4>
<p>you can probably easily add more stuff like name resolution and type-checking/inference, if you want to more closely represent the "pipeline" of the compiler</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>